/*===========================================
        Tunned GRRLIB (GX version) 3.0.1 alpha 
        Code     : NoNameNo
        GX hints : RedShade
	Tunned by: Grillo
===========================================*/

#ifndef __GXHDR__
#define __GXHDR__
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <gccore.h>

#include <pngu/pngu.h>

extern Mtx GXmodelView2D;

inline void GRRLIB_FillScreen(GXColor color);

inline void GRRLIB_Plot(f32 x,f32 y, GXColor col);
void GRRLIB_NPlot(Vector v[],GXColor c[],long n);

inline void GRRLIB_Line(f32 x1, f32 y1, f32 x2, f32 y2, GXColor col);
 
inline void GRRLIB_Rectangle(f32 x, f32 y, f32 width, f32 height, GXColor col, u8 filled);
void GRRLIB_NGone(Vector v[],GXColor c[],long n);
void GRRLIB_NGoneFilled(Vector v[],GXColor c[],long n);


u8 * GRRLIB_LoadTextureFromFile(const char *filename);
u8 * GRRLIB_LoadTexture(const unsigned char my_png[]);
inline void GRRLIB_DrawImg(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], float radians, float scaleX, f32 scaleY, GXColor tint );
inline void GRRLIB_DrawTile(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], float radians, float scaleX, f32 scaleY, u8 alpha, f32 frame,f32 maxframe );
inline void GRRLIB_DrawChar(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], float radians, float scaleX, f32 scaleY, u8 frame, GXColor c );

void GRRLIB_Printf(f32 xpos, f32 ypos, u8 font[],u16 font_width ,u16 font_height , GXColor col, f32 zoom, char *text,...);

GXColor GRRLIB_Splitu32(u32 color);

void GRRLIB_GXEngine(Vector v[], GXColor c[], long count,u8 fmt);


void GRRLIB_InitVideo ();
void GRRLIB_Start();
void GRRLIB_Render ();


#endif
